package corejava2;

public class MyVector<T> {
    T[] data;
    int size;


    private T get(int idx) {
        return data[idx];
    }

    private int size() {
        return size;
    }

    private void add(T ele) {
        data[size++] = ele;
    }

    public static void main(String[] args) {
        MyVector<Integer> list = new MyVector<>();
        for (int i = 0; i < 10; i++) {
            list.add(i);
        }
        for (int i = 0; i < list.size(); i++) {
            System.out.println(list.get(i));
        }
    }
}
